﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ERP_RORZE_SYSTEM;

namespace ERP_RORZE_DLL.Assembly
{
    public partial class panel_F4Producing : UserControl
    {
        public panel_F4Producing()
        {
            InitializeComponent();            
        }
        
        private void buttonView_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.reportMonth.EditValue.ToString()))
            {
                MessageBox.Show("Please select Month");                
            }
            else
            {
                reportDocument.DocumentSource = null;
                rpt_F4Producing F4Producing = new rpt_F4Producing();
                F4Producing.month = this.reportMonth.DateTime.ToString("yyyyMM");
                F4Producing.LoadData();
                F4Producing.CreateDocument();
                reportDocument.DocumentSource = F4Producing;
            }
        }        
    }
}
